let index = 0;

let commontimer = setInterval(() => {
    if (index == -200) {
        index = 0;
        cls();
    } else {
        index += -100;
        cls();
    }
}, 3000)

$('#common_pre').click(function () {
    if (index == -200) {
        index = 0;
        cls();
    } else {
        index += -100;
        cls();
    }
})
$('#common_next').click(function () {
    if (index == 0) {
        index = -200;
        cls();
    } else {
        index += 100;
        cls();
    }
})


//控制轮播移动
function cls() {
    $('.common-swiper').css({
        "left": index + "%",
    })
}